package com.hjqjl.module_home.ui.feature;

import android.content.Context;
import android.content.Intent;

import com.hjqjl.common_lib.base.feature.SlideBackActivity;
import com.hjqjl.module_home.databinding.HomeActivityTestslidebackBinding;

public class TestSlideBackActivity extends SlideBackActivity<HomeActivityTestslidebackBinding> {
    public static void start(Context context) {
        Intent starter = new Intent(context, TestSlideBackActivity.class);
        context.startActivity(starter);
    }

    @Override
    public void initListener() {
        pVBinding.homeBtnTestslidebackSwitch.setOnClickListener(v -> {
            if (isOpenSlideBack()) {
                setOpenSlideBack(false);
                pVBinding.homeBtnTestslidebackSwitch.setText("已关闭侧滑关闭本activity功能");
            } else {
                setOpenSlideBack(true);
                pVBinding.homeBtnTestslidebackSwitch.setText("已开启侧滑关闭本activity功能");
            }
        });
    }
}
